package cn.well.cloud.generator.engine.config;

/**
 * model模板生成的配置
 *
 * @author fengshuonan
 * @date 2017-05-07 22:12
 */
public class ModelConfig {

    private ContextConfig contextConfig;

    private String entityPathTemplate;
    private String entityBasePathTemplate;

    private String packageName;

    public void init() {
        this.entityPathTemplate = "\\src\\main\\java\\" + contextConfig.getProPackage().replaceAll("\\.", "\\\\") + "\\" + contextConfig.getModuleName() + "\\model\\\\{}.java";
        this.entityBasePathTemplate = "\\src\\main\\java\\" + contextConfig.getProPackage().replaceAll("\\.", "\\\\") + "\\" + contextConfig.getModuleName() + "\\model\\base\\Base{}.java";
        this.packageName = contextConfig.getProPackage() + "." + contextConfig.getModuleName() + ".model";
    }

    public String getPackageName() {
        return packageName;
    }

    public void setPackageName(String packageName) {
        this.packageName = packageName;
    }

    

    public String getEntityPathTemplate() {
		return entityPathTemplate;
	}

	public void setEntityPathTemplate(String entityPathTemplate) {
		this.entityPathTemplate = entityPathTemplate;
	}

	public String getEntityBasePathTemplate() {
		return entityBasePathTemplate;
	}

	public void setEntityBasePathTemplate(String entityBasePathTemplate) {
		this.entityBasePathTemplate = entityBasePathTemplate;
	}

	public ContextConfig getContextConfig() {
        return contextConfig;
    }

    public void setContextConfig(ContextConfig contextConfig) {
        this.contextConfig = contextConfig;
    }
}
